package com.learn.hibernatevalidator.chapter02.objectgraph.containerelement;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author: liyf
 * @create: 2024-12-22 15:09
 **/
@Data
public class Car {

    private List<@NotNull @Valid Person> passengers = new ArrayList<>();

    private Map<@NotNull @Valid Part, List<@Valid Manufacturer>> partManufacturers = new HashMap<>();
}
